<!DOCTYPE html>
<html class="no-js" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>微博登录</title>
<link rel="stylesheet" href="/files/reset.css">
<link rel="stylesheet" href="/files/supersized.css">
<link rel="stylesheet" href="/files/style.css">

<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
<script>
function Hdata()
{
	$("#img").attr('src',"/verify/"+Math.random())
}
function stada(e)
{
	if(e==1){
		var reg = /^[A-Za-z]{1}\w{5,11}$/;//必须以字母开头长度在6-12个字符
		if(reg.test($('#user').val())){
				$('#user').next().css({'color':'red'}).html('');
		}else{
			$('#user').next().css({'color':'red'}).html("必须以字母开头长度在6-12个字符")
		}
	}else if(e==2){
		var reg = /^[!@#$%^&*()_+`\-=:';"<>,.\/\w]{6,12}$/;//允许特殊符号长度在6-12个字符
		if(reg.test($('#pwd').val())){
				$('#pwd').next().css({'color':'red'}).html('');
		}else{
			$('#pwd').next().css({'color':'red'}).html("允许特殊符号长度在6-12个字符")
		}
	}else if(e==3){
		var reg = /^[A-Za-z0-9]{4}$/;//数字和字母长度为4
		if(reg.test($('#code').val())){
				$('#code').next().css({'color':'red'}).html('');
		}else{
			$('#code').next().css({'color':'red'}).html("数字和字母长度为4");
		}
	}
}

//-----------flash 时间----------------------//
function LoadBlogParts(){
	var swfUrl = "http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.swf";
	var swfTitle = "honehoneclock";
	var sUrl = swfUrl;
	var sHtml = "";
	sHtml += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="160" height="70" id="' + swfTitle + '" align="middle">';
	sHtml += '<param name="allowScriptAccess" value="always" />';
	sHtml += '<param name="movie" value="' + sUrl + '" />';
	sHtml += '<param name="quality" value="high" />';
	sHtml += '<param name="bgcolor" value="#ffffff" />';
	sHtml += '<param name="wmode" value="transparent" />';
	sHtml += '<embed wmode="transparent" src="' + sUrl + '" quality="high" bgcolor="#ffffff" width="160" height="70" name="' + swfTitle + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	sHtml += '</object>';
	document.write(sHtml);
}


</script>


    </head>

    <body>

        <div class="page-container">
            <h1>微博登录</h1>
            <form action="/index.php/index/user/login" method="post">
                <input name="user" id='user' onblur='stada(1)' class="username" placeholder="用户名" type="text" /><span style=' margin-top:20px; vertical-align:middle; display:inline-block;'></span>
                <input name="pwd" class="password" id='pwd' onblur='stada(2)'  placeholder="密码" type="password" /><span style=' margin-top:20px; vertical-align:middle; display:inline-block;'></span>
                <input name="code" class="code" placeholder="验证码" id='code' onblur='stada(3)' type="text"><span style=' margin-top:20px; vertical-align:middle; display:inline-block;'></span><br>
                <img src='/index.php/index/user/verify' id='checkCodeImg' width="150px" height='40px' style=' margin-top:15px; vertical-align:middle; '>&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:refreshCc();' style='color:green;fontsize:16px;'>看不清 换一张</a></img>
                <button type="submit">登录</button>
                 <div class="error" id='error'><span>+</span></div>
            </form>
            <div class="connect">
	      		 <script> LoadBlogParts();</script>
            </div>
        </div>
		<script>
		function refreshCc() { //刷新
			document.getElementById("checkCodeImg").src= "/index.php/index/user/verify?"+Math.random(); // 连随机数的作用是请缓存
		}
		</script>
        <!-- Javascript -->
        <script src="/files/jquery-1.js"></script>
        <script src="/files/supersized.js"></script>
        <script src="/files/supersized-init.js"></script>
        <script src="/files/scripts.js"></script>

</body>
</html>
